package com.bawei.library_common.utils

import android.content.Context
import android.widget.ImageView
import com.bawei.library_common.image.ImageCrop
import com.bawei.library_common.image.ImageLoaderManager
import com.bawei.library_common.image.ImageOptions
import com.bawei.library_common.image.ImageStrategy

/**
 * @Author : yaotianxue
 * @Time : On 2023/5/23 16:03
 * @Description : ImageUtils
 */
class ImageUtils {
    companion object{
        val manager = ImageLoaderManager(ImageStrategy.Glide)
        val options: ImageOptions = ImageOptions.Builder()
//            .setPlaceImage(R.mipmap.ic_launcher)
//            .setErrorImage(R.mipmap.ic_launcher)
            .setSkipDiskCache(false)
            .setSkipMemoryCache(true)
            .build()

        fun  loadImageView(context: Context,source:Any,target:ImageView){
            manager.loadIntoImageView(context,source,target,options)
        }

    }
}